﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentValidation;
using Mammoth.ViewModels;

namespace Mammoth.Validations
{
    public class AddAccountValidator : AbstractValidator<AddAccountFormViewModel>
    {
        public AddAccountValidator()
        {
            RuleFor(x => x.Email).EmailAddress().WithMessage("Email tidak valid");
            RuleFor(x => x.Email).NotEmpty().WithMessage("Email tidak boleh dikosongkan");
            RuleFor(x => x.Password).NotEmpty().WithMessage("Passowrd tidak boleh dikosongkan");
        }
    }
}
